package com.albert.eurekaconsumer.service;

import com.albert.eurekaconsumer.interceptor.FeignBasicAuthRequestInterceptor;
import com.albert.eurekaconsumer.model.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "eureka-producer", path = "/userinfo" , configuration = FeignBasicAuthRequestInterceptor.class)
public interface IUserInfoService {
    @RequestMapping(method = RequestMethod.POST, value = "/add", consumes = "application/json")
    String add(UserInfo u);

    @RequestMapping(method = RequestMethod.POST, value = "/query_user")
    UserInfo queryUserbyLoginName(String loginName);
}
